A complex program can sometimes be executed as multiple loosely-coupled threads, with each thread processing a business function for one or more business objects. These multiple threads can be executed in parallel to reduce processing time. For example, a processing task of updating two business objects can be executed by two parallel threads that run concurrently, with each thread updating one business object. The multiple threads can be executed by more than one computer, e.g., a cluster of computers. Cluster computing can improve system performance with respect to processing duration and system availability.
When a processing task is executed as multiple threads on a cluster of computers, each thread may need to update an object in a shared repository that is accessible by multiple users. To ensure data integrity, a user has to obtain an access right (e.g., a lock) on an object before he can update the object. The locks on the objects can be exclusive. That is, after the user obtains the locks from the system, no other user can read from or write into these objects and all other lock requests for any of these objects will be rejected by the system. Other users may obtain locks on the objects once the user releases the locks.
Conventional concurrency management (also referred to as “lock management”) uses a fixed assignment scheme that assigns an individual lock to each thread. The fixed assignment scheme tightly connects the lifetime of locks with the lifetime of the owner thread. This tight connection is not well-suited for a cluster computing environment, in which the locks are to be shared across all computers in the same cluster. This is because with the conventional scheme, a single thread crash could lead to the loss of locks of many independently running threads on multiple computers. As a result, the independent threads will be running on their own without the protection of locks. However, if the locks are not revoked after all threads of a processing task have come to an end, other follow-up processing tasks may not be able to access the locked objects. Thus, there is a need for improvement of the lock management in a multi-user environment.